﻿<html>
<head><title>LikeUs</title>
<link href="./Styles/Site.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#4b6c9e">
<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function () {
        FB.init({
            appId: '449559341758052', // App ID
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true  // parse XFBML
        });

        // Additional initialization code here
        FB.Event.subscribe('auth.authResponseChange', function (response) {
            if (response.status === 'connected') {
            } else if (response.status === 'not_authorized') {
            } else {
            }
        });
    };

    function startfacebook() {
        FB.init({
            appId: '449559341758052', // App ID
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true  // parse XFBML
        });

        // Additional initialization code here
        FB.Event.subscribe('auth.authResponseChange', function (response) {
            if (response.status === 'connected') {
                // the user is logged in and has authenticated your
                // app, and response.authResponse supplies
                // the user's ID, a valid access token, a signed
                // request, and the time the access token 
                // and signed request each expire
                var uid = response.authResponse.userID;
                var accessToken = response.authResponse.accessToken;
                // TODO: Handle the access token
                // Do a post to the server to finish the logon
                // This is a form post since we don't want to use AJAX
                var form = document.createElement("form");
                form.setAttribute("method", 'post');
                form.setAttribute("action", '/FacebookLogin.ashx');

                var field = document.createElement("input");
                field.setAttribute("type", "hidden");
                field.setAttribute("name", "accessToken");
                field.setAttribute("value", accessToken);
                form.appendChild(field);

                document.body.appendChild(form);
                form.submit();
            } else if (response.status === 'not_authorized') {
                // the user is logged in to Facebook, 
                // but has not authenticated your app
            } else {
                // the user isn't logged in to Facebook
            }
        });
    }

    // Load the SDK Asynchronously
    (function (d) {
        var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
        if (d.getElementById(id)) { return; }
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        ref.parentNode.insertBefore(js, ref);
    } (document));
</script>

<table style="position:absolute;top:20%;left:10%" cellpadding="20">
<tr><td><center><font size="10" color="white" style="font-family:'HeadFont'">
                    Like Us
                </font></center></td></tr>
<tr><td>
<p class="menu" align="center">
<font color="white" size="3">
Likeus where you find what you like.<br />
It takes only few clicks to get the best recommendations 
<br />according to your personal taste. <a href="./howitworks.aspx">Learn More..</a></font>
</p>
</td>
<td>
<table cellpadding="5">
<tr>
<td>
<p class="menu"><font size="6">
<a href="./Movies.aspx" >Continue</a></font>
</p>
</td>

<td><p class="menu"><font color="white"> OR</font></p></td>
<td>
<p class="menu"><fb:login-button scope="read_stream,email,user_hometown,user_status,user_subscriptions" onlogin="startfacebook();">Facebook Login</fb:login-button>
</p>
</td>
<td><p class="menu"><font color="white"> OR</font></p></td>
<td>
<p class="menu"><font size="6">
<a href="./Account/Login.aspx" >LikeUs Login</a></font>
</p>
</td>

</tr>
</table>
</td>
</tr>
</table>
<p style="position:absolute;left:45%;top:90%;color:white"><i>LikeUs All Rights Reserved</i></p>
</body>
</html>


